/*
 * Copyright (c) 2015 MONKEYK Information Technology Co. Ltd
 * www.monkeyk.com
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * MONKEYK Information Technology Co. Ltd ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with MONKEYK Information Technology Co. Ltd.
 */
package com.feng.oauth2jwt.oauth.infrastructure.jdbc;




import com.feng.oauth2jwt.oauth.domain.resource.ResourceIds;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class ResourceIdsRowMapper implements RowMapper<ResourceIds> {


    public ResourceIdsRowMapper() {
    }

    @Override
    public ResourceIds mapRow(ResultSet rs, int i) throws SQLException {
        ResourceIds resourceIds = new ResourceIds();

        resourceIds.setId(rs.getInt("id"));
        resourceIds.setResourceId(rs.getString("resource-id"));
        resourceIds.setResourceName(rs.getString("resource-name"));

        return resourceIds;
    }
}
